<!DOCTYPE html>
<html lang="en">
  <head>
    <title>OHMySQLQueryContext Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/objc/Class/OHMySQLQueryContext" class="dashAnchor"></a>
    <a title="OHMySQLQueryContext Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">OHMySQL Docs</a> (89% documented)</p>
        <p class="header-right"><a href="https://github.com/oleghnidets/OHMySQL"><img src="../img/gh.png"/>View on GitHub</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">OHMySQL Reference</a>
        <img id="carat" src="../img/carat.png" />
        OHMySQLQueryContext Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Categories.html">Categories</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Categories/NSObject(Mapping).html">NSObject(Mapping)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Categories/NSString(Escaping).html">NSString(Escaping)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/OHMySQLContainer.html">OHMySQLContainer</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/OHMySQLQueryContext.html">OHMySQLQueryContext</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/OHMySQLQueryRequest.html">OHMySQLQueryRequest</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/OHMySQLQueryRequestFactory.html">OHMySQLQueryRequestFactory</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/OHMySQLStore.html">OHMySQLStore</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/OHMySQLStoreCoordinator.html">OHMySQLStoreCoordinator</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/OHMySQLTimeline.html">OHMySQLTimeline</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/OHMySQLUser.html">OHMySQLUser</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/OHSSLConfig.html">OHSSLConfig</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Constants.html">Constants</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Constants.html#/c:@OHJoinFull">OHJoinFull</a>
              </li>
              <li class="nav-group-task">
                <a href="../Constants.html#/c:@OHJoinInner">OHJoinInner</a>
              </li>
              <li class="nav-group-task">
                <a href="../Constants.html#/c:@OHJoinLeft">OHJoinLeft</a>
              </li>
              <li class="nav-group-task">
                <a href="../Constants.html#/c:@OHJoinRight">OHJoinRight</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/CharsetEncoding.html">CharsetEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/OHProtocolType.html">OHProtocolType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/OHRefreshOptions.html">OHRefreshOptions</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/OHResultErrorType.html">OHResultErrorType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/OHMappingProtocol.html">OHMappingProtocol</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Functions.html#/c:@F@MySQLCharsetForEncoding">MySQLCharsetForEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/c:@F@NSStringEncodingFromCharsetEncoding">NSStringEncodingFromCharsetEncoding</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>OHMySQLQueryContext</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OHMySQLQueryContext</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                </div>
              </div>
            <p>An instance of this class is responsible for executing queries, saving/updating/deleting objects.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)initWithParentQueryContext:"></a>
                    <a name="//apple_ref/objc/Method/-initWithParentQueryContext:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)initWithParentQueryContext:">-initWithParentQueryContext:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initializes a context with a given parent context.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithParentQueryContext</span><span class="p">:</span>
    <span class="p">(</span><span class="n">nullable</span> <span class="n">OHMySQLQueryContext</span> <span class="o">*</span><span class="p">)</span><span class="nv">parentQueryContext</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="nv">parentQueryContext</span><span class="p">:</span> <span class="kt">OHMySQLQueryContext</span><span class="p">?)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>parentQueryContext</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The parent of the context.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>Initialized context with set parent context.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(py)parentQueryContext"></a>
                    <a name="//apple_ref/objc/Property/parentQueryContext" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(py)parentQueryContext">parentQueryContext</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The parent of the context.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">atomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span>
    <span class="n">OHMySQLQueryContext</span> <span class="o">*</span><span class="n">parentQueryContext</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">parent</span><span class="p">:</span> <span class="kt">OHMySQLQueryContext</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(py)storeCoordinator"></a>
                    <a name="//apple_ref/objc/Property/storeCoordinator" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(py)storeCoordinator">storeCoordinator</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Should be set by a user of this class.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">atomic</span><span class="p">,</span> <span class="n">nonnull</span><span class="p">)</span>
    <span class="n"><a href="../Classes/OHMySQLStoreCoordinator.html">OHMySQLStoreCoordinator</a></span> <span class="o">*</span><span class="n">storeCoordinator</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">storeCoordinator</span><span class="p">:</span> <span class="kt"><a href="../Classes/OHMySQLStoreCoordinator.html">OHMySQLStoreCoordinator</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(py)insertedObjects"></a>
                    <a name="//apple_ref/objc/Property/insertedObjects" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(py)insertedObjects">insertedObjects</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The set of objects that have been inserted into the context but not yet saved in a persistent store.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readonly</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span>
    <span class="n">NSSet</span><span class="o">&lt;</span><span class="n">__kindof</span> <span class="n">NSObject</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/OHMappingProtocol.html">OHMappingProtocol</a></span><span class="o">&gt;</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">insertedObjects</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(py)updatedObjects"></a>
                    <a name="//apple_ref/objc/Property/updatedObjects" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(py)updatedObjects">updatedObjects</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The set of objects that have been updated into the context but not yet saved in a persistent store.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readonly</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span>
    <span class="n">NSSet</span><span class="o">&lt;</span><span class="n">__kindof</span> <span class="n">NSObject</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/OHMappingProtocol.html">OHMappingProtocol</a></span><span class="o">&gt;</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">updatedObjects</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(py)deletedObjects"></a>
                    <a name="//apple_ref/objc/Property/deletedObjects" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(py)deletedObjects">deletedObjects</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The set of objects that have been deleted into the context but not yet saved in a persistent store.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readonly</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span>
    <span class="n">NSSet</span><span class="o">&lt;</span><span class="n">__kindof</span> <span class="n">NSObject</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/OHMappingProtocol.html">OHMappingProtocol</a></span><span class="o">&gt;</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">deletedObjects</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)executeQueryRequest:error:"></a>
                    <a name="//apple_ref/objc/Method/-executeQueryRequest:error:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)executeQueryRequest:error:">-executeQueryRequest:error:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Executes a query.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="nf">executeQueryRequest</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/OHMySQLQueryRequest.html">OHMySQLQueryRequest</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">query</span>
                      <span class="nf">error</span><span class="p">:(</span><span class="n">NSError</span> <span class="o">*</span><span class="n">_Nullable</span> <span class="o">*</span><span class="n">_Nullable</span><span class="p">)</span><span class="nv">error</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">execute</span><span class="p">(</span><span class="n">_</span> <span class="nv">query</span><span class="p">:</span> <span class="kt"><a href="../Classes/OHMySQLQueryRequest.html">OHMySQLQueryRequest</a></span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>query</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An query that should be executed.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>error</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The error that occurred during the attempt to execute.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)executeQueryRequestAndFetchResult:error:"></a>
                    <a name="//apple_ref/objc/Method/-executeQueryRequestAndFetchResult:error:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)executeQueryRequestAndFetchResult:error:">-executeQueryRequestAndFetchResult:error:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Executes a query and returns result. This method is the most applicable for SELECT queries.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nullable</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n">NSDictionary</span><span class="o">&lt;</span><span class="n">NSString</span> <span class="o">*</span><span class="p">,</span> <span class="n">id</span><span class="o">&gt;</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span>
<span class="nf">executeQueryRequestAndFetchResult</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/OHMySQLQueryRequest.html">OHMySQLQueryRequest</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">query</span>
                            <span class="nf">error</span><span class="p">:(</span><span class="n">NSError</span> <span class="o">*</span><span class="n">_Nullable</span> <span class="o">*</span><span class="n">_Nullable</span><span class="p">)</span><span class="nv">error</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">executeQueryRequestAndFetchResult</span><span class="p">(</span><span class="n">_</span> <span class="nv">query</span><span class="p">:</span> <span class="kt"><a href="../Classes/OHMySQLQueryRequest.html">OHMySQLQueryRequest</a></span><span class="p">)</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="p">[[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]]</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>query</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An query that should be executed.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>error</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The error that occurred during the attempt to execute.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>Result parsed as an array of dictionaries.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)lastInsertID"></a>
                    <a name="//apple_ref/objc/Method/-lastInsertID" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)lastInsertID">-lastInsertID</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">NSNumber</span> <span class="o">*</span><span class="p">)</span><span class="n">lastInsertID</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">lastInsertID</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">NSNumber</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>Returns a value representing the first automatically generated value that was set for an AUTO_INCREMENT column by the most recently executed INSERT statement to affect such a column. Returns 0, which reflects that no row was inserted. Or returns 0 if the previous statement does not use an AUTO_INCREMENT value.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)affectedRows"></a>
                    <a name="//apple_ref/objc/Method/-affectedRows" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)affectedRows">-affectedRows</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nullable</span> <span class="n">NSNumber</span> <span class="o">*</span><span class="p">)</span><span class="n">affectedRows</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">affectedRows</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">NSNumber</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>An integer greater than zero indicates the number of rows affected or retrieved. Zero indicates that no records were updated for an UPDATE statement, no rows matched the WHERE clause in the query or that no query has yet been executed. -1 indicates that the query returned an error.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)insertObject:"></a>
                    <a name="//apple_ref/objc/Method/-insertObject:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)insertObject:">-insertObject:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Makes object ready to be inserted.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">insertObject</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSObject</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/OHMappingProtocol.html">OHMappingProtocol</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">object</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)updateObject:"></a>
                    <a name="//apple_ref/objc/Method/-updateObject:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)updateObject:">-updateObject:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Makes object ready to be updated.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">updateObject</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSObject</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/OHMappingProtocol.html">OHMappingProtocol</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">object</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)deleteObject:"></a>
                    <a name="//apple_ref/objc/Method/-deleteObject:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)deleteObject:">-deleteObject:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Makes object ready to be deleted.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">deleteObject</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSObject</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/OHMappingProtocol.html">OHMappingProtocol</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">object</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)refreshObject:"></a>
                    <a name="//apple_ref/objc/Method/-refreshObject:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)refreshObject:">-refreshObject:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Removes object from deleted/inserted/updated.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">refreshObject</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSObject</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/OHMappingProtocol.html">OHMappingProtocol</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">object</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)save:"></a>
                    <a name="//apple_ref/objc/Method/-save:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)save:">-save:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Attempts to commit unsaved changes.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="nf">save</span><span class="p">:(</span><span class="n">NSError</span> <span class="o">*</span><span class="n">_Nullable</span> <span class="o">*</span><span class="n">_Nullable</span><span class="p">)</span><span class="nv">error</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">save</span><span class="p">()</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>error</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>A pointer to an NSError object. </p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>YES if the save succeeds, otherwise NO.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)performBlock:"></a>
                    <a name="//apple_ref/objc/Method/-performBlock:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)performBlock:">-performBlock:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Performs block asynchronously.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">performBlock</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">dispatch_block_t</span><span class="p">)</span><span class="nv">block</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">perform</span><span class="p">(</span><span class="n">_</span> <span class="nv">block</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OHMySQLQueryContext(im)saveToPersistantStore:"></a>
                    <a name="//apple_ref/objc/Method/-saveToPersistantStore:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OHMySQLQueryContext(im)saveToPersistantStore:">-saveToPersistantStore:</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Saves to MySQL store asynchronously in global queue.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">saveToPersistantStore</span><span class="p">:</span>
    <span class="p">(</span><span class="n">nonnull</span> <span class="kt">void</span> <span class="p">(</span><span class="o">^</span><span class="p">)(</span><span class="n">NSError</span> <span class="o">*</span><span class="n">_Nullable</span><span class="p">))</span><span class="nv">completionHandler</span><span class="p">;</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">save</span><span class="p">(</span><span class="n">toPersistantStore</span> <span class="nv">completionHandler</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Error</span><span class="p">?)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2018 <a class="link" href="https://github.com/oleghnidets" target="_blank" rel="external">Oleg</a>. All rights reserved. (Last updated: 2018-05-02)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.2</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
